public class ComputeFact
{
   /**
      A method to compute n factorial (n!) recursively
      @param n a number >= 0
      @return the value of n!
   */
   public static int recursion(int num){

        int sum=1;

        if(num < 0)

            throw new IllegalArgumentException("/n");

        if(num==1){

            return 1;

        }else{

            sum=num * recursion(num-1);

            return sum;

        }

    }